package com.example.rabbitmq.demo5_lazy_mode;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author songyahui
 * @Date 2023/7/13 14:45
 * @Description
 */

@Configuration
public class LazyModeConfig {

    @Bean
    public Queue queueLazyMode(){
        return QueueBuilder.durable("lazy_mode_queue").withArgument("x-queue-mode", "lazy").build();
    }
}
